Skip to main content

Full text of "perq :: PERQ Editor"

See other formats


PERa 

Systems 
Corporation 



EDITOR USER'S GUIDE 



March 1984 



This manual is for use with POS Release G.5 and subsequent 
releases until further notice. 



Copyri 9 ht(C) 1982, 1983, 1984 
PERQ Systems Corporation 
2600 Liberty Avenue 
P. 0. Box 2600 
Pittsburgh, PA 15230 
(412) 355-0900 



This document is not to be reproduced in any form or 
transmitted in whole or in part, without the prior written 
authorization of PERQ Systems Corporation. 

The information in this document is subject to change 
without notice and should not be construed as a commitment 
by PERQ Systems Corporation. The company assumes no 
responsibility for any errors that may appear in this 
document . 

PERQ Systems Corporation will make every effort to keep 
customers apprised of all documentation changes as quickly 
as possible. The Reader's Comments card is distributed with 
this document to request users' critical evaluation to 
assist us in preparing future documentation. 



PERQ and PERQ2 are trademarks of PERQ Systems Corporation: 



- n - 



PREFACE 



- 111 - 



- IV - 



Editor User's Guide - Version 2.10 



January 15 t 1984 



Table of Contents 



1 Introduction 

2 HELP - Get Explanations 

2 Q - Quit from the Editor 

3 Special Keys 
3 INS - Repeat the Last Command 

Repeat Count 

Reverse Direction 

> - Set Forward Direction 

< - Set Reverse Direction 

View Selection 

The Scroll Bar 

5 LF, Control -LF - Scroll 

5 T - Move Selection to Top of Screen 

5 B - Move Selection to Bottom of Screen 

5 The Thumb Bar 

6 N - Note Current Position 
6 Text Selection 

6 E - Extend the selection 

6 X - Select the Entire File 

6 F - Find a Character String 

7 Text Modification 

7 A - Append Text After the Selection 

7 D - Delete the Selected Text 

7 I - Insert Text Before the Selection 

8 R - Replace Occurrences of One String with Another 

8 V - Toggle Verify Mode 

9 S - Substitute New Text for the Selected Text 
9 Character Selection 

10 SPACE - Advance to Next Character 

10 BACKSPACE - Go Back a Character 

10 TAB - Advance Five Characters 

10 Control-TAB - Go Back Five Characters 

10 Control -RETURN - Back to Beginning of Line 

10 RETURN - Advance to Next Line 

10 Control -RETURN - Back to Beginning of Line 

10 X - Thumb bar 

11 G - Go to Character 
11 w, W - Select Word 

11 L - Select Current Line 

11 M - More in Selection 

12 Transcript/Replay 



_ v - 



Editor User's Guide - Version 2.10 January 15, 1984 



- vi - 



Editor User's Guide - Version 2. 



January 15 , 1984 



Introduction 

It is a good idea to try out the Editor at a PERQ while 

reading. Use the system -Copy" command to copy one of the Editor's 

help files to a scratch file and eliminate the possibility of 
accidental changes. For example: 

Copy >HelpDir>EditorHelp>Introduct ion. Help Scratch. File 

You can read the file while editing. Now edit the scratch file: 

Edit Scratch. File 

The PERQ text Editor is a "point, act" Editor; to perform an 
editing action, you first "point" to a piece of text in the file and 
then perform some action on it. Pointing is done with the tablet 
and puck. Optionally, you can use a bitpad and puck or pen. (The 
tablet and three-button puck are standard. ) When you move the puck 
on the tablet, the pointer on the screen moves to follow it. The 
pointer changes shape depending on where it is on the screen. It is 
usually an up-and-left pointing arrow, but changes in certain 
to an up-pointing arrow, a down-pointing arrow, or a circle, 
shapes indicate that different things happen when you press 
buttons on the puck (or press with the pen). 



areas 
These 
the 



To select a specific piece of text, move the puck so the 
pointer is at the text and press the left button (white on a 
four-button puck). A single press selects a character. A second 
press, without moving the pointer, selects the word of adjacent 
letters and digits. A third press selects the entire line. Another 
way to select an entire line is to press when the pointer is at the 
left margin line. The other buttons on the puck can also make 
selections: the middle button (yellow on a four-button puck) 
selects a word, and the right button (green on a four-button puck) 
extends or contracts the selection to the pointer position. (Addi- 
tionally, the blue button on a four-button puck selects a line.) 
The following diagrams detail the button functions: 



Standard 
Three-button puck 

Key 



Optional 
Four-button puck 



ewe 



c = character 
w = word 
e = extend 



A 

/y\ 

A A 

/ V \ 

\w A g/ 

V V 

\ b/ 

V 



w 

y 
g 

b 



Key 

White (character) 
Yellow (word) 
Green (extend) 
Blue (line) 



To extend or contract the selection, move the pointer to the 
desired piece of text and type "E". The selection extends to a 
character, word, or line boundary, depending on the type of your 
last selection. Commands that change the selection (other than 
Extend, W, and L) set the type to character. 



- 1 - 



Editor User's Guide - Version 2.10 January 15, 1984 

After selecting text, you can insert before or after it, delete 
it, search for a character string that follows it, or perform any of 
the other Editor actions. The top line of the screen usually shows 
editor version, file name, and time. It also displays repeat counts 
and flags for More, Verify, and direction. The top line is also 
used for error messages and prompts within commands. 

When the first line of text is showing on the screen, it is 
indicated by a M > w in the left margin— this is the beg inning-of -text 
marker. When the last character of the file is showing on the 
screen, it is followed by a "< H — this is the end-of-text marker. 
You may select this character, but it is not affected by text 
modification commands. 

The following sections describe the available commands. Each 
command description begins with the letter of the key used to 
perform the command. 

First Things First 

HELP - Get explanations 

Type the HELP key to get explanations of the editor commands. 
(If you are "in" a command, you may need to type DEL before 
typing HELP. ) The editor displays a list of commands and 
keywords. Type the name of an entry (the word or letter before 
the dash) and the editor displays an explanation. To exit, 
press the RETURN key. 

Q - Quit from the Editor 

To exit the editor, type the "(T key. (If you are "in" a 
command, you may need to type DEL before typing "CT.) When you 
type "CT, the Editor erases the screen and informs you whether 
or not the file has changed. It then displays a list of 
options: 

U to update <your file name> (omitted if file is unchanged) 

W to write to another file 

E to exit without updating 

R to return to the Editor 

Type one of these letters followed by RETURN. 

If you update or write to a file that already exists, the 
Editor saves the old version of the file by adding a "$" to the 
end of its name. This allows you to get the old version back 
if you decide you made a mistake. You can safely edit the 
backup file since it has a different name than the new version 
of the file. 

While it is never a good idea to type control -C while you're in 
the Editor, you should not type it while the Editor is writing 
the new copy of your file. You will lose the new version of 
your file, and the old version will be in the backup file. If 
you type control -C before writing the new file or type "E" to 
exit without updating, your file will remain unchanged regard- 
less of any changes you made with the Editor. 

- 2 - 



Editor User's Guide - Version 2.10 



January 15, 1984 



Special Keys 

The Text Modification commands are terminated by -Accept " or 
"Reject*. The first of these indicates that the change is desired, 
the editor makes the change. The second foregoes the change, the 
editor leaves the text as it was before the command. Press the INS 
key to signal acceptance or the DEL key to signal rejection. 

When inserting text with the Editor, BACK SPACE deletes the 
most recently typed character, control-BACK SPACE deletes the most 
recently typed word, and control-OOPS deletes the most recently 
typed line up to and including the carriage return. The RETURN key 
(carriage return) marks the end of each line in your file. The 
Editor does automatic indenting for you by supplying leading blanks 
on the new line to match those on the previous line. You may BACK 
SPACE over them or type additional spaces. 

The special keys have alternates as shown by this table: 



Action 
End-of-line 



Character 
RETURN 



Erase character BACK SPACE 

Erase word control-BACK SPACE 

Erase line control-OOPS 



Alternate 

control -M , control -J 
-or- control -M,LF 

control -H 

control -W 

control -U 

control -Y 

control -N 

-none- 

Since these special keys have special meanings, they must be 
"quoted" to insert them in your file; Type control-" (the Editor 
quote character) followed by the special key. When you type 
control-", the insert cursor changes from "_" to " "to indicate 
you typed the quote character. 



Accept 


INS 


Reject 


DEL 


Quote 


control 



INS - Repeat the last command 

Typing the INS key at command level repeats the last command. 
Only certain commands may be repeated this way, since it does 
not make sense to repeat some commands like X and Extend. 
Commands that may be repeated are A, I, R, S, and those which 
move the selection. 



- 3 - 



Editor User's Guide - Version 2.10 January 15, 1984 

Repeat Count 

Typing a 1- to 4-digit number enters a repeat count; it is 
displayed in the prompt line after the letter W R\ This number 
specifies how many times to execute the next command, but it only 
applies if the command is Find, Repeat, Goto character, LF(Scroll), 
Line, Word, or one of the Character Selection commands. The number 
of repetitions actually performed is displayed in the prompt line 
after the letter M C M . 



Reverse Direction 

Many commands move through the file. They can do this either 
forward toward the end of the file or in reverse toward the 
beginning of the file. The current direction is displayed by a "<" 
or H >" in the upper left corner of the screen. It effects the 
commands Find, Replace, Word, Line, and Goto character. The flag is 
turned forward by ail other commands except More, Extend, Verify, 
and Note. It is also turned forward by Find, but the old direction 
is remembered if the Find is repeated with INS. 



> - Forward Direction 

Typing a m > m sets the forward direction (toward the end of the 
file). V and "." (unshifted ">") are synonyms for this 
command . 



< - Reverse Direction 

Typing a H <" sets the reverse direction (toward the beginning 
of the file). "-" and "," (unshifted "<") are synonyms for 
this command. 



View Selection 



The Scroll Bar 

The area to the left of the left-margin line is the -scroll 
bar". If you move the pointer into this bar, it changes into an 
up-pointing arrow at the left side and a down-pointing arrow at the 
right side. If you press the left button (white button on a 
four-button puck) when the arrow is pointing up, the line at the 
pointer position scrolls to the top of the screen. If you press 
when the arrow is pointing down, the top line of the screen scrolls 
down to the line at the pointer position. Thus if you put the 
pointer near the top of the screen and press repeatedly, you can 
scroll slowly through the file. If you put the pointer near the 
bottom of the screen, you can move through the file in large jumps 
of pages. If you put the pointer near the middle of the screen, you 



- 4 - 



Editor User's Guide - Version 2.10 January 15, 1984 

can move through the file in half-page jumps. 

When the pointer is in the Scroll Bar area, the puck buttons 
have special meanings: the middle button (yellow button on a 
four-button puck) always scrolls the text up and the right button 
(green button on a four-button puck) always scrolls it down. 

LF, Control-LF - Scroll 

LF repositions the screen window so it displays text starting 
with the 37th line of the previous display. Control-LF scrolls 
in the other direction so the previous top of the screen is at 
the new bottom. 



T - Top , . . 

The line containing the end of the current selection is moved 
to the screen. If on-screen, it is moved to the bottom. 



B - Bottom 

The line containing the current selection is moved to the 
bottom of the screen. (If off-screen, it is moved to the 
middle.) 



The Thumb Bar 

The top-margin line is called the "thumb bar". When you move 
the pointer to this line, it changes into a circle. Think of the 
thumb bar as a linear representation of your file. The left end of 
the bar represents the beginning of your file. Special characters 
are used to represent other interesting parts of your file: 

< - Represents the end of the file. 

S - Represents the position of the beginning of the 
selection. 

( - Represents the position of the beginning of the 
displayed text. 

) - Represents the position of the end of the displayed 
text. 

N - Represents the position of the Noted display. 

- Represents the position of the display at the last 
thumbing. 

The thumb bar is used to rapidly move around in your file, but 
it is not very precise. When you put the pointer on the thumb bar 
and press, the portion of the file represented by that portion of 
the bar is displayed on the screen. For example, when you press at 
H S H , the Editor displays the beginning of the selection. Similar 

- 5 - 



Editor User's Guide - Version 2.10 January 15, 1984 

control can be achieved with the X command described below. 

The thumb bar can also be used to extend the selection. When 
you type "E" while in the thumb bar, the selection is extended to 
the position in the file which is represented by that particular 
portion of the thumb bar. This is usually only useful for extending 
to the beginning or end of the file. 

N - Note 

The current screen display is noted and an N is placed in the 
Thumb Bar. The thumb bar may be used to return to this current 
display by selecting the N. 



Text Selection 



Extend the selection 

This command extends or contracts the current selection from 
where it is to the text currently indicated by the pointer. 
See the M command for an alternative way to extend the 
selection. 



X- - Select the entire file 

The entire file is selected. This is useful for Find, which 
otherwise begins its search from the current selection. It is 
also useful for doing replacements throughout the text. 



F - Find a character string 

(N. B.: The search starts at the beginning of the selected 
text.) When you type T", the top line shows the prompt 

Find: enter target string 

Type the string you want to search for and then Accept or 
Reject. Rejection aborts the Find command; Acceptance starts 
the search. If you Accept immediately after typing T, the 
previous target string is used. Lower case letters in the 
target string will match both upper and lower case letters in 
the text, but UPPER case target letters will match only upper 
case text letters. 

While searching for the target, the top line displays the cue 
"Finding-. At this time, the search can be interrupted by 
typing control-c. The selection will be unchanged. 

If the target string is found, it becomes the selected text. 
Note that the target string is shown at the top of the screen 
inside of 

F{ ... } . 

- 6 - 



Editor User's Guide - Version 2.10 January 15, 1984 



A Find command can be done in the reverse direction (toward the 
beginning of the file). See the section "Reverse Direction-. 
You can ask the Editor to search for a certain number of 
occurrences of the target string by preceding the command with 
a number. See the section "Repeat Count". 



Text Modification 

The commands Insert, Append, Substitute, Replace, and Delete 
perform text modification. Insert and Append operate before and 
after the current selection. The others operate on the current 
selection itself. After execution of all but the Delete command, 
the function can be re-executed by pressing the INS key. This is 
useful for inserting the same text in a number of places. If you 
press the INS key after a Delete command, the deleted selection is 
reinserted. 



A - Append text after the selection. Type text until you are done, 
then either Accept or Reject the insertion. If you Accept 
immediately after typing "A", the most recently inserted or 
deleted text is inserted. If you Accept, the text you have 
just typed is displayed at the top of the screen inside of 

H ... ) . 



D - Delete the selected text. If you delete text, it is displayed 
at the top of the screen inside of 

D{ ... } . 

The character which immediately follows the deleted text is 
selected. If you press the INS key after typing "D", the 
deleted text is inserted. This is useful when you wish to copy 
text to another location in the file; simply select the text 
you wish to move, press "D," select the new area, and press 
INS. 



I - Insert text before the selection. Type the text and then either 
Accept or Reject the insertion. If you Accept immediately 
after typing "I", the most recently inserted or deleted text is 
inserted. If you Accept, the text you have just typed is 
displayed at the top of the screen inside of 

K ... } . 



- 7 - 



Editor User's Guide - Version 2.10 January 15, 1984 



R - Replace 

This command finds all occurrences of a given string within the 
currently selected text. As each is found, it is replaced by a 
second given string. Typing "R" causes the prompt 

Replace: enter target string 

at the top of the screen. Type in a string and then Accept or 
Reject. Note that the target string is displayed inside of 

F{ ... > 

just as though you were using the the Find command. Lower case 
letters in the target string match both upper and lower case 
letters in the text, but UPPER case target letters match only 
upper case text letters. If you Accept, the prompt 

Replace: enter replacement string 

appears at the top of the screen. Type the new string to 
replace occurrences of the target string. If you Accept before 
typing any characters of the replacement string, the previous 
replacement string is used. Thus, to replace with nothing, 
first type a character and then delete it with the BACK SPACE 
key. 

You can interrupt the "Replacing" by typing control-c. The 
Count field at the top of the screen shows how many replace- 
ments have been made. 



In the absence of a Repeat Count, the Editor replaces all 
occurrences within the selection If a Repeat Count is typed 
immediately before the "R", the specified number of occurrences 
are replaced, starting at the beginning of the selection. See 
the section "Repeat Count". The direction can be changed as 
described in the section "Reverse Direction". 



V - Toggle Verify mode 

When you type "V", Verify mode is turned on or off, depending 
on whether it was off or on before. When Verify mode is on, a 
"V" is displayed in the prompt line. Most commands revert the 
verify flag to non- verify mode. Those that do not cause 
reversion are Word, Line, *, Goto character, More, Extend, 
Note, and the Character Selection commands. 
In Verify mode the Replace command gives you the option of 
replacing, not replacing, or aborting at each occurrence of the 
target string. The prompt 

Replace: INS replaces, <space> doesn't, DEL aborts 

is displayed for each occurrence of the target string. The 

- 8 - 



Editor User's Guide - Version 2.10 January IS, 1984 

target string is indicated by a double underline and by the 
pointer arrow (if you keep the puck or pen away from the 
tablet). This double underline is difficult to see, but it's 
there. You may now Accept the replacement with INS, you may 
skip over this occurrence by typing the space-bar, or abort the 
replace command with DEL. 

S - Substitute 

New text is substituted for the selected text. This command is 
similar to the sequence "Delete, Insert". After typing "I", 
type text until you are done, then either Accept or Reject the 
insertion. If you Accept immediately after typing "S", the 
most recently inserted or deleted text is inserted. If you 
Accept, the text you have just typed is displayed at the top of 
the screen as the most recently inserted text inside of 

I{ ... ) 

and the text you have just deleted is displayed at the top of 
the screen inside of 

D{ ... } . 

After substituting, the character immediately following the 
deleted text is selected. 

Be careful. It is easy to confuse Substitute and Replace. 
There is no way to "undo" a Substitute command because you 
cannot re- insert the deleted text. Attempting to re- insert the 
most recently inserted or deleted text will merely re-insert 
the text you just typed in. The deleted text is gone forever. 
This means that if you type "S" when you meant to type "R", you 
may accidentally delete a large portion of your file and have 
no way of getting it back. (Should disaster strike, see the 
section below on "Transcript /Replay".) 



Character Selection 

The Character Selection commands move the selection as though 
it were a cursor for insert. The new selection is a single 
character close to the former selection. None of these commands is 
affected by the Reverse Direction flag, but all are performed as 
many times as specified by the Repeat Count. They reset the Reverse 
Direction flag unless the More flag is set. When the More flag is 
set, these commands still move in their usual direction; thus they 
can be used to reduce the selection. 



- 9 - 



Editor User's Guide - Version 2.10 January 15, 1984 

SPACE - Move to the character following the previous selection. 

BACKSPACE - Go to the character preceding the previous selection. 
Control -H is synonymous with this command. 

TAB - Advance five characters from end of previous selection. 

Control-TAB - Go back five characters from beginning of previous 
selection. 

Control BACKSPACE - Go to the beginning of the word preceding the 
current selection. Control-w and Control -W are synonymous with 
this command, but shift-control-W treats a word as any consecu- 
tive string of printable characters. 

RETURN - Move to first character of line following the previous 
selection. Control -U is synonymous with this command. 

Control -RETURN - Go back to first preceding non-blank that follows a 
CRLF. Control -OOPS is synonymous to this command. 

X - Thumb bar (X-Coordinate selection) 

An "X" is placed on the thumb bar at the top of the screen. 
The following keys are active: 

INS - Display the part of file corresponding to 

current position 
of the T. 
DEL - Aborts. Display and current selection are 

unaffected. 
TAB - Move "X* five positions to the right. 
control-TAB - Move "X" five positions to the left. 
SPACE - Move "X" one position to the right. 
BACKSPACE - Move "X H one position to the left. 
RETURN - Move "X" to end of file position. 
Control -RETURN - Move "X" to beginning of file 

position. 
Digits - Set repeat count for TAB'S and SPACE'S. 
- Move to marker on line. This marker indicates 

what text was displayed prior to the last thumb 

bar selection. 
N - Move to the N marker on the line. This marker 

is set by the N command. 

The current selection is unchanged by X. However, if a 
keyboard command (C, W, L, G, space, ...) is given when the 
selection is off screen, the operation is treated as though the 
first character of the screen had been previously selected. 



- 10 - 



Editor User's Guide - Version 2.10 January 15, 1984 

G - Go to character 

After typing "G", one more character is typed. The editor 
searches the rest of the screen for the character. If found, 
it becomes the current selection. If the Reverse Direction 
flag is set, G searches from the current selection toward the 
top of the screen otherwise it searches only from the selection 
downward. INS will repeat a G command if it was the last 
command executed. A repeat count may also be given to select a 
character a known number of instances away. If the More Flag 
is set, the selection is extended to the found character. 

w, W - Select Word 

This command selects the word that follows, extends, or begins 
the current selection. If the current selection is a word or 
is outside a word, the following word is selected; if 
currently inside a word, the entire word is selected. When the 
current selection overlaps more than one word, the one overlap- 
ping the beginning of the selection is chosen. Unshift-w 
chooses words that are consecutive letters and digits; Shift -W 
defines a word as any sequence of printable characters. 

A Repeat Count of (say) n will cause the selection of the n'th 
subsequent word. If the Reverse Direction flag is set, the 
search will be toward the beginning of the file. If the More 
flag is set, the selection is extended to the end of the word 
that would otherwise be selected by this command. 

L - Select Line 

If a line is currently selected, this command selects the next; 
otherwise it extends or contracts the current selection to be 
the line that included its start. 

A Repeat Count of (say) n will cause the selection of the n'th 
subsequent line. If the Reverse Direction flag is set, the 
search will be toward the beginning of the file. If the More 
flag is set, the selection is extended to the end of the line 
that would otherwise be selected by this command. 

M - More in selection 

Turns on the More flag, indicated by an M in the prompt line. 
When this flag is on, selection commands extend the current 
selection rather than change it. The selection grows only at 
the end indicated by the Reverse Direction flag. The Character 
Selection commands (SPACE, BACKSPACE, RETURN, etc.) can cause 
the selection to shrink at that end. In More mode, these 
commands do not select a single character, nor do they change 
the direction flag. More mode is extinguished by More again or 
by executing *, Extend, Quit, or one of the Text Modification 
commands . 



- 11 - 



Editor User's Guide - Version 2.10 January 15, 1984 

Transcr i pt/Repl ay 

The Editor writes a transcript file during every edit session. 
The transcript is a file which contains a description of every 
keystroke and puck or pen press performed during an edit session. 
This transcript is written to the file w >Edi tor. Transcript". The 
transcript may be replayed later. This feature is intended for use 
when the Editor or the PERQ crashes during an edit session or if you 
make some disasterous error with the Editor. 

The Editor saves keystrokes and presses and writes them to the 
transcript file whenever: 

1) A carriage-return is typed in Insert mode. 

2) A command which changes the text is successfully completed. 

3) The transcript buffer is filled. 

If an old transcript file exists, it is destroyed the first 
time the buffer is flushed. This means that you can re-enter the 
Editor without destroying the old transcript file as long as you do 
not do something that causes the buffer to be flushed. Keep in mind 
that presses count against the 256-word buffer. If you do not want 
to destroy the old transcript file, do not type any commands, do not 
press more than a few times, and exit the Editor by typing 
control -sh if t-C. 

To replay a transcript, type "Editor /Replay". The Editor 
replays the previous edit session and stops just before the first 
command. You can control the replay by typing one of the following 
keys: 

SPACE stop replaying after the next character or puck press. 
CR stop replaying after a carriage return in I command or 

after next command if not in I command. 
LF stop replaying after next command. 
INS begin replaying and stop when one of the above keys is 

typed. 
DEL exit replay mode. 

If no DEL key is typed, the Editor automatically exits from 
replay mode when the end of the transcript is reached. Once you 
have exited replay mode you can begin editing normally, but we 
suggest that you Quit-Update as soon as possible. 

Note that replay may start with the backup or $ version of the file 
and thus, when you quit the Editor, the default file name is file$ 
not file. 



- 12 -